use_frameworks!

platform :ios, '13.0'

#flutter_application_path = '/Users/jihaifeng/flutter_workspace/maoling_flutter'
#load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

def base
  pod 'MJRefresh', :git => 'https://gitee.com/mirrors/MJRefresh.git' # refresh
  pod 'SnapKit' # , :git => 'https://gitee.com/mirrors/SnapKit.git' # masory
#  pod 'DZNEmptyDataSet', :git => 'https://gitee.com/citytogo/DZNEmptyDataSet.git'
#  pod 'IQKeyboardManagerSwift', :git => 'https://gitee.com/zyiz/IQKeyboardManagerSwift.git' # keyboard
  # image
  pod 'Kingfisher' #, :git => 'https://gitee.com/zdldpk/Kingfisher.git'
end

# json
def json
  pod 'HandyJSON' , '~> 5.0.4-beta' # :git => 'https://gitee.com/mirrors/wcdb.git' :tag =>'~> 5.0.3-beta'
  pod 'SwiftyJSON' #   , :git => 'https://gitee.com/mirrors/SwiftyJSON.git' # json
end

# rxswift
def rx
  pod 'RxSwift', :git => 'https://gitee.com/mirrors/RxSwift.git', :tag => '6.5.0'
  pod 'RxCocoa' # , '~> 6.1.0'
  pod 'RxDataSources',  :git => 'https://gitee.com/Poooooodul/RxDataSources.git'
end

# rxswift
def net
  pod 'ReachabilitySwift' # , :git => 'https://gitee.com/mirrors/reachability-swift.git'
  pod 'Alamofire' # , :git => 'https://gitee.com/mirrors/alamofire.git'
  
  pod 'Moya' # , :git => 'https://gitee.com/mirrors/moya.git'
#  pod 'Moya/RxSwift', :git => 'https://gitee.com/mirrors/moya.git', :branch => 'rxswift~>6.0'
#  pod 'Moya/RxSwift', :git => 'https://github.com/peagasilva/Moya.git', :branch => 'rxswift~>6.0' # https://github.com/Moya/Moya
end

def extensions # 基础扩展
  pod 'SwiftDate' # , :git => 'https://gitee.com/hinswork/SwiftDate.git' # date
  pod 'Hue' # , :git => 'https://gitee.com/pure-iOS/Hue.git'# uicolor
end

def log # 日志
  pod 'SwiftyBeaver' # , :git => 'https://gitee.com/mirrors/swiftybeaver.git'
end

def db # 本地数据库
  pod 'Cooper_BGFMDB'
#   pod 'WCDB.swift', :git => 'https://gitee.com/mirrors/wcdb.git'
end

def toast # 吐司
  pod 'SwiftMessages' # , :git => 'https://gitee.com/tank-runner/SwiftMessages.git'
  pod 'Toast-Swift'# , :git => 'https://gitee.com/findingfield/Toast-Swift.git'
end

def crypto # 加密
  pod 'CryptoSwift', :git => 'https://gitee.com/mirrors/cryptoswift.git'
end

def key_chain
 pod 'KeychainAccess' # https://github.com/kishikawakatsumi/KeychainAccess
end

def push_pods  # 推送
  pod 'JPush' # , '3.2.8' # 极光
#  pod 'QQ_XGPush', '3.3.7' # 信鸽
end

def amap_pods   # 高德地图
  pod 'AMapLocation-NO-IDFA'                        # 定位SDK
  pod 'AMapSearch-NO-IDFA'                          # 搜索功能
  pod 'AMap3DMap-NO-IDFA'                           # 2D地图SDK
end

target 'CooperSwift_Example' do
  
  pod 'CooperSwift', :path => '../'
  
#  install_all_flutter_pods(flutter_application_path)
  
# pod 'Quick', :git => 'https://gitee.com/coolflyreg163/Quick_Quick.git'

  rx
  
  base
  
  net
  
  json
  
  log
  
  toast
  
  extensions
  
  db

  crypto
  
  pod 'Then'
  pod 'ReactorKit', :git => 'https://gitee.com/appkf_admin/ReactorKit.git'
 
  pod 'Gifu'
  
  pod 'Bugly'
  
  pod 'YogaKit' # 提供给Objective-C和Swift使用
  
  pod 'JXSegmentedView'
  
  key_chain
  
  push_pods
  
  amap_pods
  
  # 谓词搜索器swift5.1 基于kvc 属性需要 @objc
  pod 'PredicateFlow', :git => 'https://gitee.com/appkf_admin/PredicateFlow.git'
  
  pod 'ZLPhotoBrowser'
#  pod 'SKPhotoBrowser'
  
  pod 'EFQRCode'
  pod 'swiftScan' #  , :git => 'https://gitee.com/wanxy0527/SwiftScan.git'
  
  pod 'SwiftyContacts'
  
#  target 'CooperSwift_Tests' do
#    inherit! :search_paths
#    pod 'Quick', '~> 2.2.0'
##    pod 'Nimble', :git => 'https://gitee.com/mirrors/Nimble.git'
#    pod 'FBSnapshotTestCase' , '~> 2.1.4'
##    pod 'Nimble-Snapshots', :git => 'https://gitee.com/zz-github-forks/Nimble-Snapshots.git'
#    
#  end
end

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
#            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
#            config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
            config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
            config.build_settings['ENABLE_BITCODE'] = 'NO'
#            config.build_settings["DEVELOPMENT_TEAM"] = "Your Team ID"
            config.build_settings['CODE_SIGN_IDENTITY'] = ''
            
            config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
#            config.build_settings.delete 'IPHONES_DEPLOYMENT_TARGET'
#            config.build_settings['SWIFT_VERSION'] = ‘5.0’
#            config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'

            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
        end
    end
end
